home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / mod2tutb.zip / REAL2FIL.DEF < prev    next >
Text File  |  1989-01-18  |  2KB  |  54 lines

  1. DEFINITION MODULE Real2Fil;
  2.  
  3. (*        Copyright (c) 1987, 1989 - Coronado Enterprises        *)
  4.  
  5. FROM FileSystem IMPORT File;
  6.  
  7. EXPORT QUALIFIED WriteLnFile, WriteStringFile, WriteCardFile,
  8.                  WriteIntFile, WriteOctFile, WriteHexFile,
  9.                  WriteRealFile;
  10.  
  11. (* These routines are used to output formatted data to a file.   *)
  12. (* They are used much like the standard output procedures that   *)
  13. (* are available in the module "InOut".  The only real differ-   *)
  14. (* ence is in the REAL output procedure which allows inputting   *)
  15. (* the total field size, and the number of digits after the      *)
  16. (* decimal point.                                                *)
  17.  
  18. PROCEDURE WriteLnFile(VAR FileName : File);
  19.              (* Writes a return/linefeed to the file.            *)
  20.  
  21. PROCEDURE WriteStringFile(VAR FileName : File;
  22.                           String   : ARRAY OF CHAR);
  23.              (* Writes the string to the file.                   *)
  24.  
  25. PROCEDURE WriteCardFile(VAR FileName : File;
  26.                         DataOut  : CARDINAL;
  27.                         FieldSize : CARDINAL);
  28.              (* Writes a CARDINAL to the file.                   *)
  29.  
  30. PROCEDURE WriteIntFile(VAR FileName : File;
  31.                        DataOut  : INTEGER;
  32.                        FieldSize : CARDINAL);
  33.              (* Writes an INTEGER to the file.                   *)
  34.  
  35. PROCEDURE WriteOctFile(VAR FileName : File;
  36.                        DataOut  : CARDINAL;
  37.                        FieldSize : CARDINAL);
  38.              (* Writes a CARDINAL to the file in an octal format *)
  39.  
  40. PROCEDURE WriteHexFile(VAR FileName : File;
  41.                        DataOut  : CARDINAL;
  42.                        FieldSize : CARDINAL);
  43.              (* Writes a CARDINAL to the file in a hex format.   *)
  44.  
  45. PROCEDURE WriteRealFile(VAR FileName : File;
  46.                         DataOut  : REAL;
  47.                         FieldSize : CARDINAL;
  48.                         Digits    : CARDINAL);
  49.              (* Writes a REAL to the file with "FieldSize" total *)
  50.              (* columns and "Digits" significant places after    *)
  51.              (* the decimal point.                               *)
  52.  
  53. END Real2Fil.
  54.